/*
 * js for validate reset password after click on email url
 * @author Chamara Bandara
 * @copyright Copyright &copy; 2011 Allion Technologies (Pvt) Ltd
 */

$(function() {
    $('form').submit(function(){
        $('.error-details').removeClass('error-text');
        $('.error-details').text('');
        if ($('.new-password').val().length == 0) {
            $('.error-details').append('<p class="error-text">All feilds Required!!</p>');
            return false;
        }
        
        if ($('.repeat-password').val().length == 0) {
            $('.error-details').append('<p class="error-text">All feilds Required!!</p>');
            return false;
        }
       
        if ($('.repeat-password').attr('value') != $('.new-password').attr('value')) {
            $('.error-details').append('<p class="error-text">Re-entered password does not match</p>');
            return false;
        }
        return true;
    });
    
    
    
});


